//
//  MM_TitleView.h
//  MallManage_IOS
//
//  Created by 张浩 on 2023/9/11.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class MM_TitleView;

@protocol MM_TitleViewDelegate <NSObject>

@optional

/**
 按钮点击

 @param titleView 标题view
 @param backbtn 按钮
 */
- (void)MM_TitleView:(MM_TitleView *)titleView clickBackButton:(UIButton *)backbtn;
- (void)MM_TitleView:(MM_TitleView *)titleView clickRightButton:(UIButton *)rightbtn;
@end
typedef enum : NSUInteger {
    MM_TitleTypeNone,       //只带返回按钮
    MM_TitleTypeRight,      //带右侧按钮
    MM_TitleTypeCustomSet,  //自定义
} MM_TitleType;

@interface MM_TitleView : UIView

/**  标题  */
@property (nonatomic, copy) NSString *title;
/**  标题Label  */
@property (nonatomic, weak) UILabel *titleLabel;
/**  返回按钮  */
@property (nonatomic, weak) UIButton *backBtn;
/**  右侧按钮  */
@property (nonatomic, weak) UIButton *rightBtn;

/**  是否是首页 需要隐藏back  */
@property (nonatomic, assign) BOOL isHidebtnBack;
/**  类型  */
@property (nonatomic, assign) MM_TitleType titleType;
/**  代理  */
@property (nonatomic, weak) id<MM_TitleViewDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
